import http from '@/utils/common/http'

/**
 * 发布活动
 * */
export function addActivity (data) {
  return http({
    method: 'post',
    url: '/portal/business/activity/saveActivity',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 活动首页查询活动列表
 * */
export function queryActivityList (data) {
  return http({
    method: 'post',
    url: '/portal/business/activity/queryActivityList',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 获取活动详情
 * */
export function getActivityDetails (data) {
  return http({
    method: 'post',
    url: '/portal/business/activity/getActivityDetails',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 编辑活动详情
 * */
export function editActivity (data) {
  return http({
    method: 'post',
    url: '/portal/business/activity/saveActivity',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}

/**
 * 删除活动
 * */
export function deleteActivity (data) {
  return http({
    method: 'post',
    url: '/portal/business/activity/deleteActivity',
    header: {
      'Content-Type': 'application/json;charset=utf-8'
    },
    data
  })
}
